package com.xyz.dao.dao;

import com.free.ext.mybatis.dao.BaseDao;
import com.xyz.dao.mapper.CCustomerMapper;
import com.xyz.domain.table.CCustomer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class CCustomerDao extends BaseDao<CCustomer, Integer> {

    @Autowired
    CCustomerMapper mapper;

    public CCustomer selectByMobile(String mobile){
        return mapper.selectByMobile(mobile);
    }

    public Integer isUserExists(CCustomer customer){
        return mapper.isUserExists(customer);
    }

    public CCustomer selectByRecommendCode(String recommendCode){
        return mapper.selectByRecommendCode(recommendCode);
    }

    public CCustomer insertUserInfo(CCustomer customer){
        Integer res = mapper.insertUserInfo(customer);
        return customer;
    }

    public Integer udpCustmerPassword(CCustomer customer){return mapper.udpCustmerPassword(customer);}
}
